package com.cloud.quickcore.admin.dao;

import com.cloud.quickcommon.biz.BaseBizRepository;
import com.cloud.quickcore.admin.entity.SysUserRole;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 用户--角色中间表
 * @author NiJo_H
 * @version 1.0
 * @date 2019/8/11 21:05
 */
public interface SysUserRoleRepository extends BaseBizRepository<SysUserRole,Long>{
    @Query(value = "select role_id from sys_user_role where user_id = ?1", nativeQuery = true)
    List<Long> findRoleIdList(String userId);
}
